﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Controls;

namespace HpApi.Types
{
    public class Token
    {
        public string Value;
        public string Type;
        public long ExpireIn;
    }
    public class Signature
    {
        public string Guid;
        public string Sign;
        public string ProductId;
        public string AppId;
        public int KeyVersion;
    }

    public class Error
    {
        public int Code;
        public string Message;
    }
    public class VersionAck
    {
        public Error Error;
        public bool Force;
        public string Latest;
    }

    public enum PlatformWakeupType
    {
        SwWithSSKWS = 0,    //software with second stage keyword spotting
        HwWithoutSSKWS = 1, //hardware without second stage keyword spotting
        HwWithSSKWS = 2,    //hardware with second stage keyword spotting
    }
    public class SignatureAck
    {
        public Error Error;
        public Signature Sign;
        public Token Token;
        public IList<SkillInfo> SkillInfos;
        public PlatformWakeupType WakeupType;
        public string Telphone;
        public string MobileTelphone;
        public string QrCodeUrl;
    }

    public class SkillInfo
    {
        public string Name;
        public string Icon;
        public string Usage;
        public string Introduction;
    }

    public class AsrInfo
    {
        public int Pid;
        public string SecretKey;
    }

    //public enum AsrError
    //{

    //}
    public enum WakeupResult
    {
        Success = 0,        ///唤醒成功，获取文本
        Mistake = 1,        ///唤醒失败，停止收音
        Unknown = 2,        ///未知唤醒状态，继续收音，非唤醒类请求的时候，请忽略该字段。
        SuccessContinue = 3 ///唤醒成功，可以继续收音
    }

    public class WakeupAsrAck
    {
        public int Code;
        public string Msg;
        public bool IsSpeakBegin;
        public bool IsVoiceEnd;
        public string QueryText;
        public string QueryId;
        public string Seq;
        public WakeupResult WakeupResult;
    }
}

